<?php
require("class.phpmailer.php");
$mail  = new PHPMailer();
$mail->IsSMTP();

//GMAIL config
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the server
$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
$mail->Port       = 465;                   // set the SMTP port for the GMAIL server
$mail->Username   = "vartak@gmail.com";  // GMAIL username
$mail->Password   = "chet1gmail";            // GMAIL password
//End Gmail

$mail->From       = "vartak@gmail.com";
$mail->FromName   = "Chetan";
$mail->Subject    = "some subject";
$mail->MsgHTML("the message");

//$mail->AddReplyTo("vartak@gmail.com","Chetan S Vartak");//they answer here, optional
$mail->AddAddress("cvartak@guitarcenter.com","Chetan Vartak");
$mail->IsHTML(true); // send as HTML

if(!$mail->Send()) {//to see if we return a message or a value bolean
    echo "Mailer Error: " . $mail->ErrorInfo;
} else  echo "Message sent!";

?>